
#include "main_ui.h"
#include "menu_widget.h"
#include "notebook_widget.h"
#include "quickconnect_widget.h"

/* FIXME: Use gettext!*/
#define _(a) (a)

void
create_gtk_main_ui ()
{

  int argc = 1;
  const char* args[] = {"", "\0"};
  char** argv = (char**)&args;

  GdkPixbuf *pixbuf;
  GtkWidget *vbox;
  GtkWidget *window;

  gtk_init (&argc, &argv);
  
  window = gtk_window_new (GTK_WINDOW_TOPLEVEL);

  gtk_window_set_title (GTK_WINDOW (window), _("Lympia Shell Manager"));
  gtk_window_set_position (GTK_WINDOW (window), GTK_WIN_POS_CENTER);

  pixbuf = gtk_widget_render_icon (window,\
                                  GTK_STOCK_DIALOG_AUTHENTICATION,\
                                  GTK_ICON_SIZE_MENU,\
                                  NULL);

  gtk_window_set_default_icon (pixbuf);
  g_object_unref (pixbuf);

  g_signal_connect (GTK_WIDGET (window), "destroy",\
                                 G_CALLBACK (gtk_main_quit), NULL);

  vbox = gtk_vbox_new (FALSE, 0);

  /* Window member widget */
  gtk_box_pack_start (GTK_BOX (vbox), create_main_menu (), FALSE, FALSE, 0);
  gtk_box_pack_start (GTK_BOX (vbox), lsm_quickconnect_new (),\
    FALSE, FALSE, 0);
  gtk_box_pack_start (GTK_BOX (vbox), create_notebook_widget (), TRUE, TRUE, 0);
  gtk_box_pack_start (GTK_BOX (vbox), gtk_statusbar_new (), FALSE, FALSE, 0);
  

  gtk_container_add (GTK_CONTAINER (window), vbox);

  gtk_widget_show_all (window);

  gtk_main ();

}

